<template>
  <div class="search_case">
    <input type="text" placeholder="输入宠物种类、品种" @click="onSearchPage" />
    <svg class="search_case_icon" aria-hidden="true">
      <use xlink:href="#icon-quxiao"></use>
    </svg>
    <svg class="search_case_icon" aria-hidden="true">
      <use xlink:href="#icon-sousuo1"></use>
    </svg>
  </div>
</template>

<script>
import { useRouter } from "vue-router";

export default {
  name: "Search",
  setup() {
    const router = useRouter();
    const onSearchPage = () => {
      router.push("/useSearch");
    };
    return {
      onSearchPage,
    };
  },
};
</script>

<style scoped lang="less">
.search_case {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3rem;
  width: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
  background-color: #e2e2e2;
  input {
    width: 68%;
    height: 65%;
    border-radius: 1rem;
    border: none;
    font-size: 0.9rem;
    text-align: center;
  }
}
.search_case_icon {
  width: 1.7rem;
  height: 1.7rem;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
